#include "Battery.h"

Battery::Battery() {
    parameter = "24V/15Ah";
    outputPower = "24V";
    chargingTime = 2;
}

void Battery::print() const {
    cout << "电池参数: " << parameter << endl;
    cout << "对外供电: " << outputPower << endl;
    cout << "充电时长: " << chargingTime << " 小时" << endl;
}

void Battery::save(ofstream& outFile) const {
    outFile << parameter << endl;
    outFile << outputPower << endl;
    outFile << chargingTime << endl;
}
